home *** CD-ROM | disk | FTP | other *** search
/ Pascal Super Library / Pascal Super Library (CW International)(1997).bin / LIBRARY / SWDOS12 / ERASE.ASM < prev    next >
Assembly Source File  |  1995-02-10  |  1KB  |  34 lines

  1. ;******************************************************************
  2. ;*                            ERASE.ASM                           *
  3. ;*          Source file for SoftWeyr enhanced DOS toolbox         *
  4. ;*                           version 1.1                          *
  5. ;*                 Copyright (c) by SoftWeyr,1994                 *
  6. ;******************************************************************
  7. MODEL TPASCAL
  8. LOCALS
  9. .DATA
  10.      EXTRN DosError :word
  11. .CODE
  12.        Public EraseFile
  13.        EXTRN Asciiz:Far
  14. EraseFile Proc Far File:Dword
  15. ;Procedure EraseFile(FileName:String);
  16.                 LOCAL AName:Byte:80=LSIZE
  17.                 Push DS
  18.                 ;Load string address
  19.                 LDS SI,File
  20.                 LEA DI,AName
  21.                 Call Asciiz
  22.                 LEA DX,AName
  23.                 PUSH SS
  24.                 POP DS
  25.                 mov ah,41H
  26.                 Int 21h
  27.                 Pop ds
  28.                 jc  @@Error
  29.                 xor ax,ax
  30. @@Error:        Mov DosError,ax
  31.                 Ret
  32.               endp
  33. end
  34.